package com.xiaoxu.intranetweb.mybatisplusSzappdb.business.systemSetting;

import cn.dev33.satoken.stp.StpUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.dao.UserInfoDao;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.entity.CSysCfg;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.service.ICSysCfgService;
import com.xiaoxu.intranetweb.util.SzResult;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.*;

@Component
public class SystemSettingBu {
    @Autowired
    private UserInfoDao userInfoDao;
    @Autowired
    private ICSysCfgService icSysCfgService;

    public SzResult getSystemSetting(String plantId) throws Exception {
        //String plantId = userInfoDao.getUserFactory(StpUtil.getLoginIdByToken(token).toString()).getId();
        QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("DATA_FROM", plantId);
        List<CSysCfg> list = icSysCfgService.list(queryWrapper);
        Map<String, Map<String, Object>> map = new HashMap<>();
        map.put("pdtPlan", new HashMap<>());//发货计划
        map.put("truckQueue", new HashMap<>());//车辆排队
        map.put("picSetting", new HashMap<>());//图片库设置
        map.put("antiTheftTracking", new HashMap<>());//防盗追踪
        map.put("marginSetting", new HashMap<>());//余量设置
        map.put("preAuthorizationSetting", new HashMap<>());//预授权
        map.put("preAdjustmentSetting", new HashMap<>());//预调价
        map.put("guardAndWeighingRoom", new HashMap<>());//门卫及磅房设置
        map.put("tareSetting", new HashMap<>());//皮重设置
        map.put("BatchNumberSetting", new HashMap<>());//批次号设置
        map.put("CoalSetting", new HashMap<>());//煤设置
        map.put("truckSetting", new HashMap<>());//车辆设置
        map.put("preferentialSetting", new HashMap<>());//优惠设置
        map.put("snapSetting", new HashMap<>());//抓拍设置
        map.put("otherSetting", new HashMap<>());//其他设置
        for (CSysCfg cSysCfg : list) {
            String syscfgItemName = cSysCfg.getSyscfgItemName();
            //==========================7~12==========================
            //CalcComplByMonths
            //CalcComplByDayStart
            //PlanRemainLimit
            //PlanRemainWholePct
            if (Objects.equals(syscfgItemName, "CalcComplByMonths") || Objects.equals(syscfgItemName, "CalcComplByDayStart") || Objects.equals(syscfgItemName, "PlanRemainLimit") || Objects.equals(syscfgItemName, "PlanRemainWholePct") || Objects.equals(syscfgItemName, "EnablePdtPlan") || Objects.equals(syscfgItemName, "PdtPlanMode") || Objects.equals(syscfgItemName, "PdtPlanType") || Objects.equals(syscfgItemName, "PdtPlanDefTimeBegin") || Objects.equals(syscfgItemName, "PdtPlanDefTimeBeginFixed") || Objects.equals(syscfgItemName, "PdtPlanCalcBasis")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("pdtPlan").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("pdtPlan").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================17~44,61==========================
            if (Objects.equals(syscfgItemName, "CapEnterGateMust") || Objects.equals(syscfgItemName, "TruckApprvToEnter") || Objects.equals(syscfgItemName, "TempTruckDefRefTare") || Objects.equals(syscfgItemName, "TempTruckDefRefNet") || Objects.equals(syscfgItemName, "TempTruckDefRefGross") || Objects.equals(syscfgItemName, "TempTruckDefAgainMinTm") || Objects.equals(syscfgItemName, "TempTruckDefMustQueue") || Objects.equals(syscfgItemName, "TempTruckDefIdentyQueue") || Objects.equals(syscfgItemName, "TempTruckDefIdentyLoad") || Objects.equals(syscfgItemName, "TempTruckDefApprved") || Objects.equals(syscfgItemName, "TempTruckDefLength") || Objects.equals(syscfgItemName, "QUQueueToIdentyTmLimit") || Objects.equals(syscfgItemName, "QUCallInToPoundInTmLimitAsh") || Objects.equals(syscfgItemName, "QUCallInToPoundInTmLimitGypsum") || Objects.equals(syscfgItemName, "QUCallInToPoundInTmLimitCinder") || Objects.equals(syscfgItemName, "QUCallInToPoundInTmLimit") || Objects.equals(syscfgItemName, "QUCallInOverdueHandleMode") || Objects.equals(syscfgItemName, "QuMaxIdentyTmEarlierChkInTm") || Objects.equals(syscfgItemName, "AvoidCallInTimeOutBegin") || Objects.equals(syscfgItemName, "AvoidCallInTimeOutEnd") || Objects.equals(syscfgItemName, "GuardProhibitLeaveManu") || Objects.equals(syscfgItemName, "GuardProhibitCardLeave") || Objects.equals(syscfgItemName, "GuardMustReadCardLeave") || Objects.equals(syscfgItemName, "GuardMustReadCardLeaveManAffirm") || Objects.equals(syscfgItemName, "FellowSiteFIFO") || Objects.equals(syscfgItemName, "StrobeProhibitChgLoadSite") || Objects.equals(syscfgItemName, "QueueMaxTrucksCtrlMode") || Objects.equals(syscfgItemName, "QueueCoMaxTrucks") || Objects.equals(syscfgItemName, "QueuePdtMaxTrucks")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("truckQueue").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("truckQueue").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================72,81~91==========================
            if (Objects.equals(syscfgItemName, "dbtype_wspic") || Objects.equals(syscfgItemName, "ExWsPicDbDriver") || Objects.equals(syscfgItemName, "ExWsPicDbIp") || Objects.equals(syscfgItemName, "ExWsPicDbIpLocal_Svr") || Objects.equals(syscfgItemName, "ExWsPicDbIpLocal_Strobe") || Objects.equals(syscfgItemName, "ExWsPicDbIpLocal_Guard") || Objects.equals(syscfgItemName, "ExWsPicDbIpBackup") || Objects.equals(syscfgItemName, "ExWsPicDbPort") || Objects.equals(syscfgItemName, "ExWsPicDbSid") || Objects.equals(syscfgItemName, "ExWsPicDbUserName") || Objects.equals(syscfgItemName, "ExWsPicDbPwd") || Objects.equals(syscfgItemName, "ExWsPicDbTable")) {
                    if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                        if (Objects.equals(syscfgItemName, "ExWsPicDbPwd")){
                            map.get("picSetting").put(syscfgItemName, "******");
                        } else {
                            map.get("picSetting").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                        }
                    } else {
                        map.get("picSetting").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                    }

            }
            //==========================111~130==========================
            if (Objects.equals(syscfgItemName, "PrevTheftDevEn") || Objects.equals(syscfgItemName, "PrevTheftDevType") || Objects.equals(syscfgItemName, "PrevTheftDevConnMode") || Objects.equals(syscfgItemName, "PrevTheftDevConnMode_Svr") || Objects.equals(syscfgItemName, "PrevTheftDevConnMode_StrobeGuard") || Objects.equals(syscfgItemName, "PrevTheftDevCount") || Objects.equals(syscfgItemName, "PrevTheftDevName") || Objects.equals(syscfgItemName, "PrevTheftDevName2") || Objects.equals(syscfgItemName, "PrevTheftDevIP") || Objects.equals(syscfgItemName, "PrevTheftDevIP2") || Objects.equals(syscfgItemName, "PrevTheftDevIP_Lan") || Objects.equals(syscfgItemName, "PrevTheftDevIP_Lan2") || Objects.equals(syscfgItemName, "PrevTheftDevPort") || Objects.equals(syscfgItemName, "PrevTheftDevPort2") || Objects.equals(syscfgItemName, "PrevTheftDevPort_Lan") || Objects.equals(syscfgItemName, "PrevTheftDevPort_Lan2") || Objects.equals(syscfgItemName, "PrevTheftDevUsrName") || Objects.equals(syscfgItemName, "PrevTheftDevUsrName2") || Objects.equals(syscfgItemName, "PrevTheftDevUsrPwd") || Objects.equals(syscfgItemName, "PrevTheftDevUsrPwd2")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("antiTheftTracking").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("antiTheftTracking").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================151~158==========================
            if (Objects.equals(syscfgItemName, "RemainAlarm") || Objects.equals(syscfgItemName, "RemainLimit") || Objects.equals(syscfgItemName, "RemainAlarm_Powder") || Objects.equals(syscfgItemName, "RemainLimit_Powder") || Objects.equals(syscfgItemName, "RemainAlarm_Gypsum") || Objects.equals(syscfgItemName, "RemainLimit_Gypsum") || Objects.equals(syscfgItemName, "RemainAlarm_Cinder") || Objects.equals(syscfgItemName, "RemainLimit_Cinder")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("marginSetting").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("marginSetting").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================210~214==========================
            if (Objects.equals(syscfgItemName, "CreditLineFunc") || Objects.equals(syscfgItemName, "CreditLineEn") || Objects.equals(syscfgItemName, "CreditLineLimit") || Objects.equals(syscfgItemName, "CreditLineStartMode") || Objects.equals(syscfgItemName, "CreditLineStartPtWeekDay")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("preAuthorizationSetting").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("preAuthorizationSetting").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================220~223==========================
            if (Objects.equals(syscfgItemName, "PrePriceFunc") || Objects.equals(syscfgItemName, "PrePriceEn") || Objects.equals(syscfgItemName, "PrePriceDefAlarmPt") || Objects.equals(syscfgItemName, "PrePriceDefLimitPt")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("preAdjustmentSetting").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("preAdjustmentSetting").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================270~287==========================
            if (Objects.equals(syscfgItemName, "GuardIP") || Objects.equals(syscfgItemName, "GuardPort") || Objects.equals(syscfgItemName, "GuardName") || Objects.equals(syscfgItemName, "StrobeIP1") || Objects.equals(syscfgItemName, "StrobeIP2") || Objects.equals(syscfgItemName, "StrobeIP3") || Objects.equals(syscfgItemName, "StrobeIP4") || Objects.equals(syscfgItemName, "StrobeIP5") || Objects.equals(syscfgItemName, "StrobePort1") || Objects.equals(syscfgItemName, "StrobePort2") || Objects.equals(syscfgItemName, "StrobePort3") || Objects.equals(syscfgItemName, "StrobePort4") || Objects.equals(syscfgItemName, "StrobePort5") || Objects.equals(syscfgItemName, "StrobeHostName1") || Objects.equals(syscfgItemName, "StrobeHostName2") || Objects.equals(syscfgItemName, "StrobeHostName3") || Objects.equals(syscfgItemName, "StrobeHostName4") || Objects.equals(syscfgItemName, "StrobeHostName5")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("guardAndWeighingRoom").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("guardAndWeighingRoom").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================300~304==========================
            if (Objects.equals(syscfgItemName, "TruckTareErrorEn") || Objects.equals(syscfgItemName, "TruckTareErrorMax") || Objects.equals(syscfgItemName, "TruckTareErrorMax_Powder") || Objects.equals(syscfgItemName, "TruckTareErrorType") || Objects.equals(syscfgItemName, "TruckTareErrorHandleMode")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    //  if(Objects.equals(syscfgItemName, "TruckTareErrorType")){
                    //     BigDecimal syscfgLongValue = cSysCfg.getSyscfgLongValue();
                    // }else {
                    map.get("tareSetting").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                    //  }
                } else {
                    map.get("tareSetting").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================306~308==========================
            if (Objects.equals(syscfgItemName, "CoalBatchDigits") || Objects.equals(syscfgItemName, "CoalBatchFormatDate") || Objects.equals(syscfgItemName, "CoalBatchFormatNo")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("BatchNumberSetting").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("BatchNumberSetting").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================309~337==========================
            if (Objects.equals(syscfgItemName, "CoalBoatShipEn") || Objects.equals(syscfgItemName, "TruckCoalEn") || Objects.equals(syscfgItemName, "TruckCoalNetErrorEn") || Objects.equals(syscfgItemName, "TruckCoalNetErrorMax") || Objects.equals(syscfgItemName, "TruckCoalNetTakeMin") || Objects.equals(syscfgItemName, "TruckCoalBillGrossTopLimit") || Objects.equals(syscfgItemName, "TruckCoalBillGrossLowLimit") || Objects.equals(syscfgItemName, "TruckCoalBillTareTopLimit") || Objects.equals(syscfgItemName, "TruckCoalBillTareLowLimit") || Objects.equals(syscfgItemName, "TruckCoalBanSameShipMulSn") || Objects.equals(syscfgItemName, "TruckCoalBanMulShipSameSn") || Objects.equals(syscfgItemName, "TruckCoalBanMulBoatSameSn") || Objects.equals(syscfgItemName, "TruckCoalMustSampToLeave") || Objects.equals(syscfgItemName, "TrainCoalEn") || Objects.equals(syscfgItemName, "TrainCoalBillNetTopLimit") || Objects.equals(syscfgItemName, "TrainCoalBillNetLowLimit") || Objects.equals(syscfgItemName, "TrainCoalBillTareTopLimit") || Objects.equals(syscfgItemName, "TrainCoalBillTareLowLimit") || Objects.equals(syscfgItemName, "TrainCoalBanMulShipSameSn") || Objects.equals(syscfgItemName, "TrainCoalBanMulTrainSameSn")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("CoalSetting").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("CoalSetting").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================380~390==========================
            if (Objects.equals(syscfgItemName, "TruckDispatchEn") || Objects.equals(syscfgItemName, "TruckDispatchPdtEn") || Objects.equals(syscfgItemName, "TruckDispatchCoEn") || Objects.equals(syscfgItemName, "TruckDispatchAutoEn") || Objects.equals(syscfgItemName, "TruckDispatchAutoCancelEn") || Objects.equals(syscfgItemName, "TruckDispatchAutoTimeOutEn") || Objects.equals(syscfgItemName, "TruckDispatchAutoTimeOutValue") || Objects.equals(syscfgItemName, "PoundNoPdtLimitTruckNo") || Objects.equals(syscfgItemName, "LockLoadSiteEn") || Objects.equals(syscfgItemName, "HideSpeSplyCoEn")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("truckSetting").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("truckSetting").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================410~438==========================
            if (Objects.equals(syscfgItemName, "DiscountEn") || Objects.equals(syscfgItemName, "CashDisCount0") || Objects.equals(syscfgItemName, "CashDisCount1") || Objects.equals(syscfgItemName, "CashDisCount2") || Objects.equals(syscfgItemName, "CashDisCount3") || Objects.equals(syscfgItemName, "CashDisCount4") || Objects.equals(syscfgItemName, "CashDisCount5") || Objects.equals(syscfgItemName, "CashDisCount6") || Objects.equals(syscfgItemName, "PrepayDisCount0") || Objects.equals(syscfgItemName, "PrepayDisCount1") || Objects.equals(syscfgItemName, "PrepayDisCount2") || Objects.equals(syscfgItemName, "PrepayDisCount3") || Objects.equals(syscfgItemName, "PrepayDisCount4") || Objects.equals(syscfgItemName, "PrepayDisCount5") || Objects.equals(syscfgItemName, "PrepayDisCount6") || Objects.equals(syscfgItemName, "DieselCashDisCount0") || Objects.equals(syscfgItemName, "DieselCashDisCount1") || Objects.equals(syscfgItemName, "DieselCashDisCount2") || Objects.equals(syscfgItemName, "DieselCashDisCount3") || Objects.equals(syscfgItemName, "DieselCashDisCount4") || Objects.equals(syscfgItemName, "DieselCashDisCount5") || Objects.equals(syscfgItemName, "DieselCashDisCount6") || Objects.equals(syscfgItemName, "DieselPrepayDisCount0") || Objects.equals(syscfgItemName, "DieselPrepayDisCount1") || Objects.equals(syscfgItemName, "DieselPrepayDisCount2") || Objects.equals(syscfgItemName, "DieselPrepayDisCount3") || Objects.equals(syscfgItemName, "DieselPrepayDisCount4") || Objects.equals(syscfgItemName, "DieselPrepayDisCount5") || Objects.equals(syscfgItemName, "DieselPrepayDisCount6")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("preferentialSetting").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("preferentialSetting").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
            //==========================62~69==========================
//CapEnterSameTruckIntv
//CapEnterToPoundTimeLimit
//CapEnterCmpProvince
//CapEnterPlateErrCount
//CapEnterPlateReadyTimes
//CapOutSameTruckIntv
//CapOutFromPoundTimeLimit
//CapOutPlateReadyTimes
            if (Objects.equals(syscfgItemName, "CapEnterSameTruckIntv") || Objects.equals(syscfgItemName, "CapEnterToPoundTimeLimit") || Objects.equals(syscfgItemName, "CapEnterCmpProvince") || Objects.equals(syscfgItemName, "CapEnterPlateErrCount") || Objects.equals(syscfgItemName, "CapEnterPlateReadyTimes") || Objects.equals(syscfgItemName, "CapOutSameTruckIntv") || Objects.equals(syscfgItemName, "CapOutFromPoundTimeLimit") || Objects.equals(syscfgItemName, "CapOutPlateReadyTimes")) {
                if (StringUtils.isEmpty(cSysCfg.getSyscfgStrValue())) {
                    map.get("snapSetting").put(syscfgItemName, cSysCfg.getSyscfgLongValue());
                } else {
                    map.get("snapSetting").put(syscfgItemName, cSysCfg.getSyscfgStrValue());
                }
            }
//其他设置
            //ServerVersion
            //MulStrobeEn
            //BundPdtEn
            //AllPdtsBundPdtEn
            //MulTagFunc
            //MulTagEn
            //LimeStoneLittleOverWghtEn
            //LimeStoneSlightOverWghtTop
            //LimeStoneSlightOverWghtLow
            //LimeStoneTareWghtLow
            //ProhibitManWght
            //EnableCmptApprv
            //OrderApprvMode
            //FinanEnterApprvEn
            //FinanEnterApprvMode
            //YearSnEn
            //YearSnMode
            //WghtShtPrtYearSn
            //WghtShtPrtCurRemain
            //LoadCostTimeAlarm
            //LoadCostTimeLimit
            //CardModel
            //SnCardStartNo
            //TempCardEn
            //TempCardAllowCount
            //AgentCardTypeEn
            //PreDeductQuot
            //LoadCtrlTimeQuot
            //PreDeductQuot_Gypsum
            //LoadCtrlTimeQuot_Gypsum
            //PreDeductQuot_Cinder
            //LoadCtrlTimeQuot_Cinder
            //LevelFunc
            //LevelEn
            //LevelMainAppGetInv
            //LevelGetDataMode
            //PISvrIP
            //PISvrUsrName
            //PISvrUsrPwd
            //PISvrPtCount
            //OwnDockCardTypeEn
            //SheetSplitFunc
            //SheetSplitEn
            //TrailerNoEn
            //PowerPlantSn放批次号设置
            //AgainReadCardLoadEn
            //AgainReadCardLoadSiteCount
            //QUReadyToAgainTmLimit
            //ThirdCanOriginal
            //RightCtrlEn
            //LEDBill1
            //LEDBill2
            //LEDBill3
            //LEDBill4
            //DoubleSysSyncDbEn
            //TransitCoID
            //OriginCoID
            //HideSpeSplyCoName1
            //HideSpeSplyChiCoName1
            //HideSpeSplyCoName2
            //HideSpeSplyChiCoName2
            //HideAgoEn
            //HideAgoTime
            //Road1TouchEnterNum
            //Road2TouchEnterNum
            //Road3TouchEnterNum
            //Road4TouchEnterNum
        }
        return SzResult.success(map);
    }


    /**
     * 修改
     */
    public SzResult updateSysTemSetting(String CalcComplByMonths, String CalcComplByDayStart, String PlanRemainLimit, String PlanRemainWholePct, String EnablePdtPlan, String PdtPlanMode, String PdtPlanType, String PdtPlanDefTimeBegin, String PdtPlanDefTimeBeginFixed, String PdtPlanCalcBasis, String CapEnterGateMust, String TruckApprvToEnter, String TempTruckDefRefTare, String TempTruckDefRefNet, String TempTruckDefRefGross, String TempTruckDefAgainMinTm, String TempTruckDefMustQueue, String TempTruckDefIdentyQueue, String TempTruckDefIdentyLoad, String TempTruckDefApprved, String TempTruckDefLength, String QUQueueToIdentyTmLimit, String QUCallInToPoundInTmLimitAsh, String QUCallInToPoundInTmLimitGypsum, String QUCallInToPoundInTmLimitCinder, String QUCallInToPoundInTmLimit, String QUCallInOverdueHandleMode, String QuMaxIdentyTmEarlierChkInTm, String AvoidCallInTimeOutBegin, String AvoidCallInTimeOutEnd, String GuardProhibitLeaveManu, String GuardProhibitCardLeave, String GuardMustReadCardLeave, String GuardMustReadCardLeaveManAffirm, String FellowSiteFIFO, String StrobeProhibitChgLoadSite, String QueueMaxTrucksCtrlMode, String QueueCoMaxTrucks, String QueuePdtMaxTrucks, String dbtypewspic, String ExWsPicDbDriver, String ExWsPicDbIp, String ExWsPicDbIpLocalSvr, String ExWsPicDbIpLocalStrobe, String ExWsPicDbIpLocalGuard, String ExWsPicDbIpBackup, String ExWsPicDbPort, String ExWsPicDbSid, String ExWsPicDbUserName, String ExWsPicDbPwd, String ExWsPicDbTable, String PrevTheftDevEn, String PrevTheftDevType, String PrevTheftDevConnMode, String PrevTheftDevConnModeSvr, String PrevTheftDevConnModeStrobeGuard, String PrevTheftDevCount, String PrevTheftDevName, String PrevTheftDevName2, String PrevTheftDevIP, String PrevTheftDevIP2, String PrevTheftDevIPLan, String PrevTheftDevIPLan2, String PrevTheftDevPort, String PrevTheftDevPort2, String PrevTheftDevPortLan, String PrevTheftDevPortLan2, String PrevTheftDevUsrName, String PrevTheftDevUsrName2, String PrevTheftDevUsrPwd, String PrevTheftDevUsrPwd2, String RemainAlarm, String RemainLimit, String RemainAlarmPowder, String RemainLimitPowder, String RemainAlarmGypsum, String RemainLimitGypsum, String RemainAlarmCinder, String RemainLimitCinder, String CreditLineFunc, String CreditLineEn, String CreditLineLimit, String CreditLineStartMode, String CreditLineStartPtWeekDay, String PrePriceFunc, String PrePriceEn, String PrePriceDefAlarmPt, String PrePriceDefLimitPt, String GuardIP, String GuardPort, String GuardName, String StrobeIP1, String StrobeIP2, String StrobeIP3, String StrobeIP4, String StrobeIP5, String StrobePort1, String StrobePort2, String StrobePort3, String StrobePort4, String StrobePort5, String StrobeHostName1, String StrobeHostName2, String StrobeHostName3, String StrobeHostName4, String StrobeHostName5, String TruckTareErrorEn, String TruckTareErrorMax, String TruckTareErrorMaxPowder, String TruckTareErrorType, String TruckTareErrorHandleMode, String CoalBatchDigits, String CoalBatchFormatDate, String CoalBatchFormatNo, String CoalBoatShipEn, String TruckCoalEn, String TruckCoalNetErrorEn, String TruckCoalNetErrorMax, String TruckCoalNetTakeMin, String TruckCoalBillGrossTopLimit, String TruckCoalBillGrossLowLimit, String TruckCoalBillTareTopLimit, String TruckCoalBillTareLowLimit, String TruckCoalBanSameShipMulSn, String TruckCoalBanMulShipSameSn, String TruckCoalBanMulBoatSameSn, String TruckCoalMustSampToLeave, String TrainCoalEn, String TrainCoalBillNetTopLimit, String TrainCoalBillNetLowLimit, String TrainCoalBillTareTopLimit, String TrainCoalBillTareLowLimit, String TrainCoalBanMulShipSameSn, String TrainCoalBanMulTrainSameSn, String TruckDispatchEn, String TruckDispatchPdtEn, String TruckDispatchCoEn, String TruckDispatchAutoEn, String TruckDispatchAutoCancelEn, String TruckDispatchAutoTimeOutEn, String TruckDispatchAutoTimeOutValue, String PoundNoPdtLimitTruckNo, String LockLoadSiteEn, String HideSpeSplyCoEn, String DiscountEn, String CashDisCount0, String CashDisCount1, String CashDisCount2, String CashDisCount3, String CashDisCount4, String CashDisCount5, String CashDisCount6, String PrepayDisCount0, String PrepayDisCount1, String PrepayDisCount2, String PrepayDisCount3, String PrepayDisCount4, String PrepayDisCount5, String PrepayDisCount6, String DieselCashDisCount0, String DieselCashDisCount1, String DieselCashDisCount2, String DieselCashDisCount3, String DieselCashDisCount4, String DieselCashDisCount5, String DieselCashDisCount6, String DieselPrepayDisCount0, String DieselPrepayDisCount1, String DieselPrepayDisCount2, String DieselPrepayDisCount3, String DieselPrepayDisCount4, String DieselPrepayDisCount5, String DieselPrepayDisCount6, String CapEnterSameTruckIntv, String CapEnterToPoundTimeLimit, String CapEnterCmpProvince, String CapEnterPlateErrCount, String CapEnterPlateReadyTimes, String CapOutSameTruckIntv, String CapOutFromPoundTimeLimit, String CapOutPlateReadyTimes, String token,String plantId) throws Exception {
        //String PrevTheftDevPort_Lan2, String PrevTheftDevUsrName, String PrevTheftDevUsrName2, String PrevTheftDevUsrPwd, String PrevTheftDevUsrPwd2, String RemainAlarm, String RemainLimit, String RemainAlarm_Powder, String RemainLimit_Powder, String RemainAlarm_Gypsum, String RemainLimit_Gypsum, String RemainAlarm_Cinder, String RemainLimit_Cinder, String CreditLineFunc, String CreditLineEn, String CreditLineLimit, String CreditLineStartMode, String CreditLineStartPtWeekDay, String PrePriceFunc, String PrePriceEn, String PrePriceDefAlarmPt, String PrePriceDefLimitPt, String GuardIP, String GuardPort, String GuardName, String StrobeIP1, String StrobeIP2, String StrobeIP3, String StrobeIP4, String StrobeIP5, String StrobePort1, String StrobePort2, String StrobePort3, String StrobePort4, String StrobePort5, String StrobeHostName1, String StrobeHostName2, String StrobeHostName3, String StrobeHostName4, String StrobeHostName5, String TruckTareErrorEn, String TruckTareErrorMax, String TruckTareErrorMax_Powder, String TruckTareErrorType, String TruckTareErrorHandleMode, String CoalBatchDigits, String CoalBatchFormatDate, String CoalBatchFormatNo, String CoalBoatShipEn, String TruckCoalEn, String TruckCoalNetErrorEn, String TruckCoalNetErrorMax, String TruckCoalNetTakeMin, String TruckCoalBillGrossTopLimit, String TruckCoalBillGrossLowLimit, String TruckCoalBillTareTopLimit, String TruckCoalBillTareLowLimit, String TruckCoalBanSameShipMulSn, String TruckCoalBanMulShipSameSn, String TruckCoalBanMulBoatSameSn, String TruckCoalMustSampToLeave, String TrainCoalEn, String TrainCoalBillNetTopLimit, String TrainCoalBillNetLowLimit, String TrainCoalBillTareTopLimit, String TrainCoalBillTareLowLimit, String TrainCoalBanMulShipSameSn, String TrainCoalBanMulTrainSameSn, String TruckDispatchEn, String TruckDispatchPdtEn, String TruckDispatchCoEn, String TruckDispatchAutoEn, String TruckDispatchAutoCancelEn, String TruckDispatchAutoTimeOutEn, String TruckDispatchAutoTimeOutValue, String PoundNoPdtLimitTruckNo, String LockLoadSiteEn, String HideSpeSplyCoEn, String DiscountEn, String CashDisCount0, String CashDisCount1, String CashDisCount2, String CashDisCount3, String CashDisCount4, String CashDisCount5, String CashDisCount6, String PrepayDisCount0, String PrepayDisCount1, String PrepayDisCount2, String PrepayDisCount3, String PrepayDisCount4, String PrepayDisCount5, String PrepayDisCount6, String DieselCashDisCount0, String DieselCashDisCount1, String DieselCashDisCount2, String DieselCashDisCount3, String DieselCashDisCount4, String DieselCashDisCount5, String DieselCashDisCount6, String DieselPrepayDisCount0, String DieselPrepayDisCount1, String DieselPrepayDisCount2, String DieselPrepayDisCount3, String DieselPrepayDisCount4, String DieselPrepayDisCount5, String DieselPrepayDisCount6, String CapEnterSameTruckIntv, String CapEnterToPoundTimeLimit, String CapEnterCmpProvince, String CapEnterPlateErrCount, String CapEnterPlateReadyTimes, String CapOutSameTruckIntv, String CapOutFromPoundTimeLimit, String CapOutPlateReadyTimes,
        //String plantId = userInfoDao.getUserFactory(StpUtil.getLoginIdByToken(token).toString()).getId();
        if (CalcComplByMonths != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CalcComplByMonths");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                BigDecimal syscfgLongValue = one.getSyscfgLongValue();
                if (!new BigDecimal(CalcComplByMonths).equals(syscfgLongValue)) {
                    one.setSyscfgLongValue(new BigDecimal(CalcComplByMonths));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CalcComplByDayStart != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CalcComplByDayStart");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                BigDecimal syscfgLongValue = one.getSyscfgLongValue();
                if (!new BigDecimal(CalcComplByDayStart).equals(syscfgLongValue)) {
                    one.setSyscfgLongValue(new BigDecimal(CalcComplByDayStart));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PlanRemainLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PlanRemainLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                BigDecimal syscfgLongValue = one.getSyscfgLongValue();
                if (!new BigDecimal(PlanRemainLimit).equals(syscfgLongValue)) {
                    one.setSyscfgLongValue(new BigDecimal(PlanRemainLimit));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PlanRemainWholePct != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PlanRemainWholePct");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                BigDecimal syscfgLongValue = one.getSyscfgLongValue();
                if (!new BigDecimal(PlanRemainWholePct).equals(syscfgLongValue)) {
                    one.setSyscfgLongValue(new BigDecimal(PlanRemainWholePct));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (EnablePdtPlan != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "EnablePdtPlan");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                BigDecimal syscfgLongValue = one.getSyscfgLongValue();
                if (!new BigDecimal(EnablePdtPlan).equals(syscfgLongValue)) {
                    one.setSyscfgLongValue(new BigDecimal(EnablePdtPlan));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PdtPlanMode != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PdtPlanMode");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                BigDecimal syscfgLongValue = one.getSyscfgLongValue();
                if (syscfgLongValue != null) {
                    if (!new BigDecimal(PdtPlanMode).equals(syscfgLongValue)) {
                        one.setSyscfgLongValue(new BigDecimal(PdtPlanMode));
                        one.setDownedID1(0);
                        icSysCfgService.updateById(one);
                    }
                } else {
                    one.setSyscfgLongValue(new BigDecimal(1));
                }
            }
        }

        if (PdtPlanType != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PdtPlanType");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                BigDecimal syscfgLongValue = one.getSyscfgLongValue();
                if (syscfgLongValue != null) {
                    if (!new BigDecimal(PdtPlanType).equals(syscfgLongValue)) {
                        one.setSyscfgLongValue(new BigDecimal(PdtPlanType));
                        one.setDownedID1(0);
                        icSysCfgService.updateById(one);
                    }
                } else {
                    one.setSyscfgLongValue(new BigDecimal(1));
                }
            }
        }
        if (PdtPlanDefTimeBegin != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PdtPlanDefTimeBegin");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PdtPlanDefTimeBegin.equals((one.getSyscfgLongValue()).toString())) {
                    one.setSyscfgLongValue(new BigDecimal(PdtPlanDefTimeBegin));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PdtPlanDefTimeBeginFixed != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PdtPlanDefTimeBeginFixed");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PdtPlanDefTimeBeginFixed.equals((one.getSyscfgLongValue()).toString())) {
                    one.setSyscfgLongValue(new BigDecimal(PdtPlanDefTimeBeginFixed));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PdtPlanCalcBasis != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PdtPlanCalcBasis");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PdtPlanCalcBasis.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(PdtPlanCalcBasis));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CapEnterGateMust != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CapEnterGateMust");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CapEnterGateMust.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(CapEnterGateMust));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckApprvToEnter != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckApprvToEnter");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckApprvToEnter.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(TruckApprvToEnter));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TempTruckDefRefTare != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TempTruckDefRefTare");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TempTruckDefRefTare.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(TempTruckDefRefTare));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TempTruckDefRefNet != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TempTruckDefRefNet");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TempTruckDefRefNet.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(TempTruckDefRefNet));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TempTruckDefRefGross != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TempTruckDefRefGross");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TempTruckDefRefGross.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(TempTruckDefRefGross));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TempTruckDefAgainMinTm != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TempTruckDefAgainMinTm");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TempTruckDefAgainMinTm.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(TempTruckDefAgainMinTm));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TempTruckDefMustQueue != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TempTruckDefMustQueue");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TempTruckDefMustQueue.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(TempTruckDefMustQueue));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TempTruckDefIdentyQueue != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TempTruckDefIdentyQueue");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TempTruckDefIdentyQueue.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(TempTruckDefIdentyQueue));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TempTruckDefIdentyLoad != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TempTruckDefIdentyLoad");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TempTruckDefIdentyLoad.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(TempTruckDefIdentyLoad));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TempTruckDefApprved != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TempTruckDefApprved");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TempTruckDefApprved.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(TempTruckDefApprved));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TempTruckDefLength != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TempTruckDefLength");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TempTruckDefLength.equals((one.getSyscfgLongValue()).toString())) {
                    one.setSyscfgLongValue(new BigDecimal(TempTruckDefLength));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (QUQueueToIdentyTmLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "QUQueueToIdentyTmLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!QUQueueToIdentyTmLimit.equals((one.getSyscfgLongValue()).toString())) {
                    one.setSyscfgLongValue(new BigDecimal(QUQueueToIdentyTmLimit));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (QUCallInToPoundInTmLimitAsh != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "QUCallInToPoundInTmLimitAsh");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!QUCallInToPoundInTmLimitAsh.equals((one.getSyscfgLongValue()).toString())) {
                    one.setSyscfgLongValue(new BigDecimal(QUCallInToPoundInTmLimitAsh));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }

        if (QUCallInToPoundInTmLimitGypsum != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "QUCallInToPoundInTmLimitGypsum");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!QUCallInToPoundInTmLimitGypsum.equals((one.getSyscfgLongValue()).toString())) {
                    one.setSyscfgLongValue(new BigDecimal(QUCallInToPoundInTmLimitGypsum));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (QUCallInToPoundInTmLimitCinder != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "QUCallInToPoundInTmLimitCinder");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!QUCallInToPoundInTmLimitCinder.equals((one.getSyscfgLongValue()).toString())) {
                    one.setSyscfgLongValue(new BigDecimal(QUCallInToPoundInTmLimitCinder));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (QUCallInToPoundInTmLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "QUCallInToPoundInTmLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !QUCallInToPoundInTmLimit.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(QUCallInToPoundInTmLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (QUCallInOverdueHandleMode != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "QUCallInOverdueHandleMode");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !QUCallInOverdueHandleMode.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(QUCallInOverdueHandleMode));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (QuMaxIdentyTmEarlierChkInTm != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "QuMaxIdentyTmEarlierChkInTm");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !QuMaxIdentyTmEarlierChkInTm.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(QuMaxIdentyTmEarlierChkInTm));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (AvoidCallInTimeOutBegin != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "AvoidCallInTimeOutBegin");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !AvoidCallInTimeOutBegin.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(AvoidCallInTimeOutBegin);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (AvoidCallInTimeOutEnd != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "AvoidCallInTimeOutEnd");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !AvoidCallInTimeOutEnd.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(AvoidCallInTimeOutEnd);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (GuardProhibitLeaveManu != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "GuardProhibitLeaveManu");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !GuardProhibitLeaveManu.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(GuardProhibitLeaveManu));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (GuardProhibitCardLeave != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "GuardProhibitCardLeave");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !GuardProhibitCardLeave.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(GuardProhibitCardLeave));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (GuardMustReadCardLeave != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "GuardMustReadCardLeave");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !GuardMustReadCardLeave.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(GuardMustReadCardLeave));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (GuardMustReadCardLeaveManAffirm != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "GuardMustReadCardLeaveManAffirm");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !GuardMustReadCardLeaveManAffirm.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(GuardMustReadCardLeaveManAffirm));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (FellowSiteFIFO != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "FellowSiteFIFO");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !FellowSiteFIFO.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(FellowSiteFIFO));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeProhibitChgLoadSite != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeProhibitChgLoadSite");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobeProhibitChgLoadSite.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(StrobeProhibitChgLoadSite));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (QueueMaxTrucksCtrlMode != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "QueueMaxTrucksCtrlMode");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !QueueMaxTrucksCtrlMode.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(QueueMaxTrucksCtrlMode));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (QueueCoMaxTrucks != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "QueueCoMaxTrucks");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !QueueCoMaxTrucks.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(QueueCoMaxTrucks));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (QueuePdtMaxTrucks != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "QueuePdtMaxTrucks");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !QueuePdtMaxTrucks.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(QueuePdtMaxTrucks));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (dbtypewspic != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "dbtype_wspic");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !dbtypewspic.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(dbtypewspic));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (ExWsPicDbDriver != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbDriver");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !ExWsPicDbDriver.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(ExWsPicDbDriver);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (ExWsPicDbIp != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbIp");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !ExWsPicDbIp.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(ExWsPicDbIp);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (ExWsPicDbIpLocalSvr != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbIpLocal_Svr");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !ExWsPicDbIpLocalSvr.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(ExWsPicDbIpLocalSvr);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (ExWsPicDbIpLocalStrobe != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbIpLocal_Strobe");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !ExWsPicDbIpLocalStrobe.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(ExWsPicDbIpLocalStrobe);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (ExWsPicDbIpLocalGuard != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbIpLocal_Guard");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !ExWsPicDbIpLocalGuard.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(ExWsPicDbIpLocalGuard);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (ExWsPicDbIpBackup != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbIpBackup");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !ExWsPicDbIpBackup.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(ExWsPicDbIpBackup);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (ExWsPicDbPort != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbPort");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!ExWsPicDbPort.equals((one.getSyscfgLongValue().toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(ExWsPicDbPort));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (ExWsPicDbSid != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbSid");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!ExWsPicDbSid.equals((one.getSyscfgStrValue()))) {
                    one.setSyscfgStrValue(ExWsPicDbSid);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (ExWsPicDbUserName != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbUserName");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!ExWsPicDbUserName.equals((one.getSyscfgStrValue()))) {
                    one.setSyscfgStrValue(ExWsPicDbUserName);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (ExWsPicDbPwd != null&& !ExWsPicDbPwd.equals("******")) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbPwd");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!ExWsPicDbPwd.equals(((one.getSyscfgStrValue())))) {
                    one.setSyscfgStrValue(ExWsPicDbPwd);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (ExWsPicDbTable != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "ExWsPicDbTable");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!ExWsPicDbTable.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(ExWsPicDbTable));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevEn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(PrevTheftDevEn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevType != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevType");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevType.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(PrevTheftDevType));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevConnMode != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevConnMode");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevConnMode.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(PrevTheftDevConnMode));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevConnModeSvr != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevConnMode_Svr");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevConnModeSvr.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(PrevTheftDevConnModeSvr));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevConnModeStrobeGuard != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevConnMode_StrobeGuard");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevConnModeStrobeGuard.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(PrevTheftDevConnModeStrobeGuard));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevCount != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevCount");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevCount.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(PrevTheftDevCount));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevName != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevName");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrevTheftDevName.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(PrevTheftDevName);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrevTheftDevName2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevName2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrevTheftDevName2.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(PrevTheftDevName2);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrevTheftDevIP != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevIP");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrevTheftDevIP.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(PrevTheftDevIP);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrevTheftDevIP2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevIP2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrevTheftDevIP2.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(PrevTheftDevIP2);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }

        if (PrevTheftDevIPLan != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevIP_Lan");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevIPLan.equals(((one.getSyscfgStrValue())))) {
                    one.setSyscfgStrValue(PrevTheftDevIPLan);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevIPLan2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevIP_Lan2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrevTheftDevIPLan2.equals(one.getSyscfgStrValue())) {
                one.setSyscfgStrValue(PrevTheftDevIPLan2);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrevTheftDevPort != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevPort");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrevTheftDevPort.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(PrevTheftDevPort));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrevTheftDevPort2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevPort2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevPort2.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(PrevTheftDevPort2));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevPortLan != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevPort_Lan");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrevTheftDevPortLan.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(PrevTheftDevPortLan));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrevTheftDevPortLan2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevPort_Lan2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrevTheftDevPortLan2.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(PrevTheftDevPortLan2));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrevTheftDevUsrName != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevUsrName");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrevTheftDevUsrName.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(PrevTheftDevUsrName);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrevTheftDevUsrName2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevUsrName2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevUsrName2.equals(((one.getSyscfgStrValue())))) {
                    one.setSyscfgStrValue(PrevTheftDevUsrName2);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevUsrPwd != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevUsrPwd");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevUsrPwd.equals(((one.getSyscfgStrValue())))) {
                    one.setSyscfgStrValue(PrevTheftDevUsrPwd);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PrevTheftDevUsrPwd2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrevTheftDevUsrPwd2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PrevTheftDevUsrPwd2.equals(((one.getSyscfgStrValue())))) {
                    one.setSyscfgStrValue(PrevTheftDevUsrPwd2);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (RemainAlarm != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "RemainAlarm");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!RemainAlarm.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(RemainAlarm));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (RemainLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "RemainLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !RemainLimit.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(RemainLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (RemainAlarmPowder != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "RemainAlarm_Powder");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !RemainAlarmPowder.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(RemainAlarmPowder));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (RemainLimitPowder != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "RemainLimit_Powder");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !RemainLimitPowder.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(RemainLimitPowder));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (RemainAlarmGypsum != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "RemainAlarm_Gypsum");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !RemainAlarmGypsum.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(RemainAlarmGypsum));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (RemainLimitGypsum != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "RemainLimit_Gypsum");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !RemainLimitGypsum.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(RemainLimitGypsum));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (RemainAlarmCinder != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "RemainAlarm_Cinder");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !RemainAlarmCinder.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(RemainAlarmCinder));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (RemainLimitCinder != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "RemainLimit_Cinder");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !RemainLimitCinder.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(RemainLimitCinder));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CreditLineFunc != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CreditLineFunc");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CreditLineFunc.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(CreditLineFunc));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CreditLineEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CreditLineEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CreditLineEn.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(CreditLineEn));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CreditLineLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CreditLineLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CreditLineLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(CreditLineLimit));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CreditLineStartMode != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CreditLineStartMode");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CreditLineStartMode.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(CreditLineStartMode));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CreditLineStartPtWeekDay != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CreditLineStartPtWeekDay");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CreditLineStartPtWeekDay.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(CreditLineStartPtWeekDay));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrePriceFunc != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrePriceFunc");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrePriceFunc.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(PrePriceFunc));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrePriceEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrePriceEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrePriceEn.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(PrePriceEn));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrePriceDefAlarmPt != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrePriceDefAlarmPt");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrePriceDefAlarmPt.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(PrePriceDefAlarmPt));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrePriceDefLimitPt != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrePriceDefLimitPt");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrePriceDefLimitPt.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(PrePriceDefLimitPt));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (GuardIP != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "GuardIP");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !GuardIP.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(GuardIP);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (GuardPort != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "GuardPort");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !GuardPort.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(GuardPort));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (GuardName != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "GuardName");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !GuardName.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(GuardName);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeIP1 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeIP1");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobeIP1.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(StrobeIP1);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeIP2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeIP2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobeIP2.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(StrobeIP2);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeIP3 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeIP3");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobeIP3.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(StrobeIP3);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeIP4 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeIP4");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobeIP4.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(StrobeIP4);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeIP5 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeIP5");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobeIP5.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(StrobeIP5);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobePort1 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobePort1");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobePort1.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(StrobePort1));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobePort2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobePort2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobePort2.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(StrobePort2));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobePort3 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobePort3");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobePort3.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(StrobePort3));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobePort4 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobePort4");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobePort4.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(StrobePort4));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobePort5 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobePort5");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobePort5.equals((one.getSyscfgLongValue()).toString())) {
                one.setSyscfgLongValue(new BigDecimal(StrobePort5));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeHostName1 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeHostName1");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobeHostName1.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(StrobeHostName1);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeHostName2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeHostName2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobeHostName2.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(StrobeHostName2);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeHostName3 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeHostName3");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobeHostName3.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(StrobeHostName3);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeHostName4 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeHostName4");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !StrobeHostName4.equals((one.getSyscfgStrValue()))) {
                one.setSyscfgStrValue(StrobeHostName4);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (StrobeHostName5 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "StrobeHostName5");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!StrobeHostName5.equals(((one.getSyscfgStrValue())))) {
                    one.setSyscfgStrValue(StrobeHostName5);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckTareErrorEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckTareErrorEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckTareErrorEn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckTareErrorEn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckTareErrorMax != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckTareErrorMax");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckTareErrorMax.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckTareErrorMax));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckTareErrorMaxPowder != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckTareErrorMax_Powder");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckTareErrorMaxPowder.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckTareErrorMaxPowder));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckTareErrorType != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckTareErrorType");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckTareErrorType.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckTareErrorType));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckTareErrorHandleMode != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckTareErrorHandleMode");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckTareErrorHandleMode.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckTareErrorHandleMode));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CoalBatchDigits != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CoalBatchDigits");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CoalBatchDigits.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(CoalBatchDigits));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CoalBatchFormatDate != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CoalBatchFormatDate");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CoalBatchFormatDate.equals(((one.getSyscfgStrValue())))) {
                    one.setSyscfgStrValue(CoalBatchFormatDate);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CoalBatchFormatNo != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CoalBatchFormatNo");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CoalBatchFormatNo.equals(((one.getSyscfgStrValue())))) {
                    one.setSyscfgStrValue(CoalBatchFormatNo);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CoalBoatShipEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CoalBoatShipEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CoalBoatShipEn.equals(((one.getSyscfgStrValue())))) {
                    one.setSyscfgStrValue(CoalBoatShipEn);
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckCoalEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckCoalEn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckCoalEn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckCoalNetErrorEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalNetErrorEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckCoalNetErrorEn.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckCoalNetErrorEn));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckCoalNetErrorMax != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalNetErrorMax");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckCoalNetErrorMax.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckCoalNetErrorMax));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckCoalNetTakeMin != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalNetTakeMin");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckCoalNetTakeMin.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckCoalNetTakeMin));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckCoalBillGrossTopLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalBillGrossTopLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckCoalBillGrossTopLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckCoalBillGrossTopLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckCoalBillGrossLowLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalBillGrossLowLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckCoalBillGrossLowLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckCoalBillGrossLowLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckCoalBillTareTopLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalBillTareTopLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckCoalBillTareTopLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckCoalBillTareTopLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckCoalBillTareLowLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalBillTareLowLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckCoalBillTareLowLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckCoalBillTareLowLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckCoalBanSameShipMulSn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalBanSameShipMulSn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckCoalBanSameShipMulSn.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckCoalBanSameShipMulSn));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckCoalBanMulShipSameSn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalBanMulShipSameSn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckCoalBanMulShipSameSn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckCoalBanMulShipSameSn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckCoalBanMulBoatSameSn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalBanMulBoatSameSn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckCoalBanMulBoatSameSn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckCoalBanMulBoatSameSn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckCoalMustSampToLeave != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckCoalMustSampToLeave");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckCoalMustSampToLeave.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckCoalMustSampToLeave));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TrainCoalEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TrainCoalEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TrainCoalEn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TrainCoalEn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TrainCoalBillNetTopLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TrainCoalBillNetTopLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TrainCoalBillNetTopLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TrainCoalBillNetTopLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TrainCoalBillNetLowLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TrainCoalBillNetLowLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TrainCoalBillNetLowLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TrainCoalBillNetLowLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TrainCoalBillTareTopLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TrainCoalBillTareTopLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TrainCoalBillTareTopLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TrainCoalBillTareTopLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TrainCoalBillTareLowLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TrainCoalBillTareLowLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TrainCoalBillTareLowLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TrainCoalBillTareLowLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TrainCoalBanMulShipSameSn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TrainCoalBanMulShipSameSn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TrainCoalBanMulShipSameSn.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TrainCoalBanMulShipSameSn));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TrainCoalBanMulTrainSameSn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TrainCoalBanMulTrainSameSn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TrainCoalBanMulTrainSameSn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TrainCoalBanMulTrainSameSn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckDispatchEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckDispatchEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckDispatchEn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckDispatchEn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckDispatchPdtEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckDispatchPdtEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckDispatchPdtEn.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckDispatchPdtEn));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckDispatchCoEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckDispatchCoEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckDispatchCoEn.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckDispatchCoEn));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckDispatchAutoEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckDispatchAutoEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !TruckDispatchAutoEn.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(TruckDispatchAutoEn));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (TruckDispatchAutoCancelEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckDispatchAutoCancelEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckDispatchAutoCancelEn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckDispatchAutoCancelEn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckDispatchAutoTimeOutEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckDispatchAutoTimeOutEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckDispatchAutoTimeOutEn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckDispatchAutoTimeOutEn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (TruckDispatchAutoTimeOutValue != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "TruckDispatchAutoTimeOutValue");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!TruckDispatchAutoTimeOutValue.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(TruckDispatchAutoTimeOutValue));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (PoundNoPdtLimitTruckNo != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PoundNoPdtLimitTruckNo");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!PoundNoPdtLimitTruckNo.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(PoundNoPdtLimitTruckNo));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (LockLoadSiteEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "LockLoadSiteEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!LockLoadSiteEn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(LockLoadSiteEn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (HideSpeSplyCoEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "HideSpeSplyCoEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!HideSpeSplyCoEn.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(HideSpeSplyCoEn));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (DiscountEn != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DiscountEn");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DiscountEn.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DiscountEn));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CashDisCount0 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CashDisCount0");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CashDisCount0.equals(((one.getSyscfgStrValue())))) {
                one.setSyscfgStrValue(CashDisCount0);
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CashDisCount1 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CashDisCount1");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CashDisCount1.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(CashDisCount1));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CashDisCount2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CashDisCount2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CashDisCount2.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(CashDisCount2));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CashDisCount3 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CashDisCount3");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CashDisCount3.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(CashDisCount3));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CashDisCount4 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CashDisCount4");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CashDisCount4.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(CashDisCount4));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CashDisCount5 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CashDisCount5");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CashDisCount5.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(CashDisCount5));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CashDisCount6 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CashDisCount6");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CashDisCount6.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(CashDisCount6));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrepayDisCount0 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrepayDisCount0");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrepayDisCount0.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(PrepayDisCount0));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrepayDisCount1 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrepayDisCount1");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrepayDisCount1.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(PrepayDisCount1));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrepayDisCount2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrepayDisCount2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrepayDisCount2.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(PrepayDisCount2));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrepayDisCount3 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrepayDisCount3");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrepayDisCount3.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(PrepayDisCount3));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrepayDisCount4 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrepayDisCount4");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrepayDisCount4.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(PrepayDisCount4));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrepayDisCount5 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrepayDisCount5");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrepayDisCount5.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(PrepayDisCount5));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (PrepayDisCount6 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "PrepayDisCount6");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !PrepayDisCount6.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(PrepayDisCount6));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselCashDisCount0 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselCashDisCount0");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselCashDisCount0.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselCashDisCount0));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselCashDisCount1 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselCashDisCount1");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselCashDisCount1.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselCashDisCount1));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselCashDisCount2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselCashDisCount2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselCashDisCount2.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselCashDisCount2));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselCashDisCount3 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselCashDisCount3");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselCashDisCount3.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselCashDisCount3));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselCashDisCount4 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselCashDisCount4");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselCashDisCount4.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselCashDisCount4));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselCashDisCount5 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselCashDisCount5");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselCashDisCount5.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselCashDisCount5));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselCashDisCount6 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselCashDisCount6");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselCashDisCount6.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselCashDisCount6));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselPrepayDisCount0 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselPrepayDisCount0");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselPrepayDisCount0.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselPrepayDisCount0));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselPrepayDisCount1 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselPrepayDisCount1");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselPrepayDisCount1.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselPrepayDisCount1));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselPrepayDisCount2 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselPrepayDisCount2");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselPrepayDisCount2.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselPrepayDisCount2));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselPrepayDisCount3 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselPrepayDisCount3");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselPrepayDisCount3.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselPrepayDisCount3));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselPrepayDisCount4 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselPrepayDisCount4");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselPrepayDisCount4.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselPrepayDisCount4));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselPrepayDisCount5 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselPrepayDisCount5");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselPrepayDisCount5.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselPrepayDisCount5));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (DieselPrepayDisCount6 != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "DieselPrepayDisCount6");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !DieselPrepayDisCount6.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(DieselPrepayDisCount6));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CapEnterSameTruckIntv != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CapEnterSameTruckIntv");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CapEnterSameTruckIntv.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(CapEnterSameTruckIntv));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CapEnterToPoundTimeLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CapEnterToPoundTimeLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null && !CapEnterToPoundTimeLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                one.setSyscfgLongValue(new BigDecimal(CapEnterToPoundTimeLimit));
                one.setDownedID1(0);
                icSysCfgService.updateById(one);
            }
        }
        if (CapEnterCmpProvince != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CapEnterCmpProvince");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CapEnterCmpProvince.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(CapEnterCmpProvince));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CapEnterPlateErrCount != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CapEnterPlateErrCount");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CapEnterPlateErrCount.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(CapEnterPlateErrCount));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CapEnterPlateReadyTimes != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CapEnterPlateReadyTimes");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CapEnterPlateReadyTimes.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(CapEnterPlateReadyTimes));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CapOutSameTruckIntv != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CapOutSameTruckIntv");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CapOutSameTruckIntv.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(CapOutSameTruckIntv));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CapOutFromPoundTimeLimit != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CapOutFromPoundTimeLimit");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CapOutFromPoundTimeLimit.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(CapOutFromPoundTimeLimit));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }
        if (CapOutPlateReadyTimes != null) {
            QueryWrapper<CSysCfg> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("SYSCFG_ITEM_NAME", "CapOutPlateReadyTimes");
            queryWrapper.eq("DATA_FROM", plantId);
            CSysCfg one = icSysCfgService.getOne(queryWrapper);
            if (one != null) {
                if (!CapOutPlateReadyTimes.equals(((one.getSyscfgLongValue()).toString()))) {
                    one.setSyscfgLongValue(new BigDecimal(CapOutPlateReadyTimes));
                    one.setDownedID1(0);
                    icSysCfgService.updateById(one);
                }
            }
        }

        return SzResult.Success();
    }
}
